<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/blog/Blog.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/blog/Blog.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'BlogId',
                footer: "Foots",
                cnName: '博客管理',
                name: 'blog/Blog',
                url: "/Blog/",
                sortName: "BlogId"
            });
            const editFormFields = ref({"BlogTitle":"","BlogCategoryId":"","BlogContext":"","BlogDesc":"","ReleaseDate":""});
            const editFormOptions = ref([[{"title":"博客标题","field":"BlogTitle"}],
                              [{"dataKey":"blogs","data":[],"title":"博客分类","field":"BlogCategoryId","type":"select"}],
                              [{"title":"内容","field":"BlogContext","type":"editor"}],
                              [{"title":"描述","field":"BlogDesc","type":"textarea"}],
                              [{"title":"发布时间","field":"ReleaseDate","type":"datetime"}]]);
            const searchFormFields = ref({"BlogCategoryId":"","BlogTitle":""});
            const searchFormOptions = ref([[{"dataKey":"blogs","data":[],"title":"博客分类","field":"BlogCategoryId","type":"select"},{"title":"博客标题","field":"BlogTitle","type":"like"}]]);
            const columns = ref([{field:'BlogId',title:'博客编号 ',type:'int',width:80,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'BlogCategoryId',title:'博客分类',type:'int',bind:{ key:'blogs',data:[]},width:80,align:'left',sort:true},
                       {field:'BlogDesc',title:'描述',type:'string',width:120,align:'left'},
                       {field:'BlogContext',title:'内容',type:'string',width:110,align:'left'},
                       {field:'BlogTitle',title:'博客标题',type:'string',width:110,align:'left'},
                       {field:'CreateID',title:'创建人Id',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'发布人',type:'string',width:130,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ReleaseDate',title:'发布时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人Id',type:'int',width:80,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
